//
// Created by tonystark on 16/3/30.
// Copyright (c) 2016 sewm. All rights reserved.
//

#import "Api+Login.h"
#import "DesEncrypt.h"

@implementation Api (Login)
/**
 * 登陆接口
 *   1. mobile
 *   2. password
 */
+ (AFHTTPRequestOperation *)login:(NSDictionary *)body success:(SuccessBlock)success faild:(FailBlock)faild {
#define kServerLoginName @"client_login"
    NSString *mobile = [DesEncrypt encryptUseDES:body[@"mobile"] key:kDESCKey];
    NSString *pwd = [DesEncrypt encryptUseDES:body[@"password"] key:kDESCKey];
    return [self getConnection:success fail:faild parameters:@{@"mobile":mobile,@"password":pwd} method:Method_Post serviceName:kServerLoginName];
}

@end